function convert(button, converter) {
	var parent = button.parentNode;
	var fromObj = parent.from;
	var toObj = document.createElement("div");
	if (parent == null || converter == null) {
		button.value = "null obj found.";
		return;
	}
	
	var text = fromObj.value;
	var crlf = "\n";
	if (text.indexOf("\r\n") >= 0) {
		crlf = "\r\n";
	} else if (text.indexOf("\r") >= 0) {
		crlf = "\r";
	}
	var lines = text.split(crlf);
	for (var i=0; i<lines.length; i++) {
		var buf = lines[i];
		for (var j=0; j<converter.length; j++) {
				buf = converter[j].convert(buf);
		}
		buf = document.createTextNode(buf);
		toObj.appendChild(buf);
		toObj.appendChild(document.createElement("br"));
	}
	parent.appendChild(toObj);
}
